import request from '@/utils/request'

// 创建评价
export function createAppraise(data) {
  return request({
    url: '/lfd/appraise/create',
    method: 'post',
    data: data
  })
}

// 更新评价
export function updateAppraise(data) {
  return request({
    url: '/lfd/appraise/update',
    method: 'put',
    data: data
  })
}

// 删除评价
export function deleteAppraise(id) {
  return request({
    url: '/lfd/appraise/delete?id=' + id,
    method: 'delete'
  })
}

// 获得评价
export function getAppraise(id) {
  return request({
    url: '/lfd/appraise/get?id=' + id,
    method: 'get'
  })
}

// 获得评价分页
export function getAppraisePage(query) {
  return request({
    url: '/lfd/appraise/page',
    method: 'get',
    params: query
  })
}

// 导出评价 Excel
export function exportAppraiseExcel(query) {
  return request({
    url: '/lfd/appraise/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
